load("@rules_zig//zig:defs.bzl", "zig_library", "zig_test")

zig_library(
    name = "async",
    srcs = [
        "asyncio.zig",
        "channel.zig",
        "coro.zig",
        "coro_base.zig",
        "executor.zig",
        "stack.zig",
    ],
    zigopts = ["-lc"],
    extra_srcs = glob(["asm/*.s"]),
    main = "async.zig",
    visibility = ["//visibility:public"],
    deps = [
        "//stdx",
        "@libxev",
    ],
)

zig_test(
    name = "test",
    testonly = False,
    deps = [":async"],
)
